package com.gitee.wsl.collections.map

import androidx.collection.FloatObjectMap
import androidx.collection.MutableFloatObjectMap


/**
 * Returns an empty, read-only [FloatObjectMap].
 */
@Suppress("UNCHECKED_CAST")
fun<V>  Maps.emptyFloatObjectMap(): FloatObjectMap<V> = androidx.collection.emptyFloatObjectMap()

/**
 * Returns an empty, read-only [FloatObjectMap].
 */
@Suppress("UNCHECKED_CAST")
fun<V>  Maps.floatObjectMapOf(): FloatObjectMap<V> = androidx.collection.floatObjectMapOf()

/**
 * Returns a new [FloatObjectMap] with [key1] associated with [value1].
 */
fun<V>  Maps.floatObjectMapOf(
    key1: Float,
    value1: V
): FloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
}

/**
 * Returns a new [FloatObjectMap] with [key1], and [key2]
 * associated with [value1], and [value2], respectively.
 */
fun<V>  Maps.floatObjectMapOf(
    key1: Float,
    value1: V,
    key2: Float,
    value2: V,
): FloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
    map[key2] = value2
}

/**
 * Returns a new [FloatObjectMap] with [key1], [key2], and [key3]
 * associated with [value1], [value2], and [value3], respectively.
 */
fun<V>  Maps.floatObjectMapOf(
    key1: Float,
    value1: V,
    key2: Float,
    value2: V,
    key3: Float,
    value3: V,
): FloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
    map[key2] = value2
    map[key3] = value3
}

/**
 * Returns a new [FloatObjectMap] with [key1], [key2], [key3], and [key4]
 * associated with [value1], [value2], [value3], and [value4], respectively.
 */
fun<V>  Maps.floatObjectMapOf(
    key1: Float,
    value1: V,
    key2: Float,
    value2: V,
    key3: Float,
    value3: V,
    key4: Float,
    value4: V,
): FloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
    map[key2] = value2
    map[key3] = value3
    map[key4] = value4
}

/**
 * Returns a new [FloatObjectMap] with [key1], [key2], [key3], [key4], and [key5]
 * associated with [value1], [value2], [value3], [value4], and [value5], respectively.
 */
fun<V>  Maps.floatObjectMapOf(
    key1: Float,
    value1: V,
    key2: Float,
    value2: V,
    key3: Float,
    value3: V,
    key4: Float,
    value4: V,
    key5: Float,
    value5: V,
): FloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
    map[key2] = value2
    map[key3] = value3
    map[key4] = value4
    map[key5] = value5
}

/**
 * Returns a new [MutableFloatObjectMap].
 */
fun<V>  Maps.mutableFloatObjectMapOf(): MutableFloatObjectMap<V> = MutableFloatObjectMap()

/**
 * Returns a new [MutableFloatObjectMap] with [key1] associated with [value1].
 */
fun<V>  Maps.mutableFloatObjectMapOf(
    key1: Float,
    value1: V
): MutableFloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
}

/**
 * Returns a new [MutableFloatObjectMap] with [key1], and [key2]
 * associated with [value1], and [value2], respectively.
 */
fun<V>  Maps.mutableFloatObjectMapOf(
    key1: Float,
    value1: V,
    key2: Float,
    value2: V,
): MutableFloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
    map[key2] = value2
}

/**
 * Returns a new [MutableFloatObjectMap] with [key1], [key2], and [key3]
 * associated with [value1], [value2], and [value3], respectively.
 */
fun<V>  Maps.mutableFloatObjectMapOf(
    key1: Float,
    value1: V,
    key2: Float,
    value2: V,
    key3: Float,
    value3: V,
): MutableFloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
    map[key2] = value2
    map[key3] = value3
}

/**
 * Returns a new [MutableFloatObjectMap] with [key1], [key2], [key3], and [key4]
 * associated with [value1], [value2], [value3], and [value4], respectively.
 */
fun<V>  Maps.mutableFloatObjectMapOf(
    key1: Float,
    value1: V,
    key2: Float,
    value2: V,
    key3: Float,
    value3: V,
    key4: Float,
    value4: V,
): MutableFloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
    map[key2] = value2
    map[key3] = value3
    map[key4] = value4
}

/**
 * Returns a new [MutableFloatObjectMap] with [key1], [key2], [key3], [key4], and [key5]
 * associated with [value1], [value2], [value3], [value4], and [value5], respectively.
 */
fun<V>  Maps.mutableFloatObjectMapOf(
    key1: Float,
    value1: V,
    key2: Float,
    value2: V,
    key3: Float,
    value3: V,
    key4: Float,
    value4: V,
    key5: Float,
    value5: V,
): MutableFloatObjectMap<V> = MutableFloatObjectMap<V>().also { map ->
    map[key1] = value1
    map[key2] = value2
    map[key3] = value3
    map[key4] = value4
    map[key5] = value5
}